Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Improve Cleanup Temporary Files in Chipmunk Home Directory #2142

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AmmarAbouZor
Copy link
Member

This PR closes #2137

It improves cleaning up the temporary files (Logs and attachments) generated by an observe session with the following changes:

  • Cleanup function for individual sessions is called when the session is dropped instead of calling it explicitly, ensuring that it will be called even on panics or in integration tests.
  • Extend cleanup function for individual sessions to remove the attachments besides removing the main log file.
  • A general cleaning up function to scan the temporary directory in Chipmunk and remove all files and directories that are older than two months. This function will be called on start of Chipmunk and will run on a separate thread to avoid blocking the initialization of the app on cleaning up huge temporary directory

* Call cleaning up session files on dropping session state on ensure it
  will be called always (even with panics or integration tests.)
* Clean up attachments directory and its content if exists.
* Provide function to cleanup the temporary directory from entries
  that are older than two months old.
* Run this function each time Chipmunk starts on a separate thread to
  avoid blocking initialization thread on cleaning up large temporary
  directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Cleanup Session Temporary Files
1 participant